home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 18
/
CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso
/
CUCD
/
Magazine
/
WiredWorld
/
THOR_2.5_upgrade
/
rexx
/
JoinNewGroup.thor
< prev
next >
Wrap
Text File
|
1997-09-08
|
2KB
|
61 lines
/*
$VER: JoinNewGroup.thor 1.1 (21.06.96)
(c) Neil Bothwick <neil@wirenet.co.uk> 1996
*/
/* Presents the contents of a NewGroups message in a */
/* listview and creates join events for those selected */
options results
/* needs THOR and bbsread.library functions */
thorport = address()
if left(thorport,5) ~= 'THOR.' then do
say 'No THOR port found. This script must be run from Thor.'
exit 10
end
if ~show('p', 'BBSREAD') then do
address command
'run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead'
'WaitForPort BBSREAD'
end
address(thorport)
drop MSG.
CURRENTMSG stem MSG /* Get info on current message */
if rc ~= 0 then ExitMsg(THOR.LASTERROR)
if upper(MSG.CONFNAME) ~= 'INFORMATION' then ExitMsg('This script only works from the Information conference')
address(bbsread) /* Read list of new newsgroups */
drop TEXT.
READBRMESSAGE bbsname '"'MSG.BBSNAME'"' confname '"'MSG.CONFNAME'"' msgnr MSG.MSGNR textstem TEXT
address(thorport)
drop PICKED.
REQUESTLIST instem TEXT.TEXT outstem PICKED /* Show new groups in a listview */
if RC = 5 then ExitMsg('No newsgroup selected')
if RC > 0 then ExitMsg(THOR.LASTERROR)
NewGroup = RESULT
address(bbsread)
drop NEWEVENT. /* Create join event */
NEWEVENT.CONFERENCE = NewGroup
WRITEBREVENT bbsname '"'MSG.BBSNAME'"' event 2 stem NEWEVENT
if rc ~= 0 then ExitMsg(BBSREAD.LASTERROR)
address(thorport)
REQUESTNOTIFY '"'NewGroup' joined"' '"OK"'
exit
ExitMsg:
address(thorport)
parse arg errmsg
REQUESTNOTIFY '"'errmsg'"' '" OK "'
exit